package cn.imu.appdevexperiment2022.three;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;

import cn.imu.appdevexperiment2022.R;
import cn.imu.appdevexperiment2022.start.BaseActivity;

public class ThreeActivity extends BaseActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_three);
        Button buttonThree1 = findViewById(R.id.button_third_1);
        final EditText editText = (EditText)findViewById(R.id.edit_text);
        final ImageView imageView = (ImageView)findViewById(R.id.image_view);
        buttonThree1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(ThreeActivity.this,"你点击了ThreeActivity的按钮",
                        Toast.LENGTH_SHORT).show();
                imageView.setImageResource(R.drawable.img_2);
                String inputText = editText.getText().toString();
                Toast.makeText(ThreeActivity.this,inputText,Toast.LENGTH_SHORT).show();
            }
        });
    }
}